-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use feature flag to create internal LB #5311
Conversation
Skipping CI for Draft Pull Request. |
0340bf6
to
f13bec7
Compare
f13bec7
to
90ba0f0
Compare
4bba77d
to
9f43ff7
Compare
90ba0f0
to
3536e79
Compare
/test |
@nawazkh: The
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/test pull-cluster-api-provider-azure-apiversion-upgrade |
3536e79
to
8d09e90
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5311 +/- ##
=======================================
Coverage 52.53% 52.53%
=======================================
Files 272 272
Lines 29421 29422 +1
=======================================
+ Hits 15456 15457 +1
Misses 13166 13166
Partials 799 799 ☔ View full report in Codecov by Sentry. |
faee040
to
1d605fe
Compare
/test pull-cluster-api-provider-azure-apiversion-upgrade |
azure/scope/cluster.go
Outdated
&loadbalancers.LBSpec{ | ||
// API Server LB | ||
Name: s.APIServerLB().Name, | ||
frontendLB := &loadbalancers.LBSpec{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we changing the way we construct the cluster LB in this way? I don't see any functional difference (indeed I wouldn't want to) and I don't see any of these new variables being re-used by the conditional ILB construction below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, there is no functional difference.
We are using a separate variable for the APIServer LB because the logic to "save" frontendIPs has been pulled to a for
loop.
It's been pulled out because the frontendIPs can have at most two IPs.
It seemed cleaner to me to have it as a separate local variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is more value in optimizing for a leaner diff.
- We aren't making any functional changes to the existing LB constructor outcomes
- We are making a significant functional change within this function scope
If possible, we want the diff to be a reflection of the above, making #2 in particular as conspicuous as possible, to predict for better reviews (easier to read) and easier historical analysis ("what exactly did we do with that change?").
If there are other improvements to be made as part of the process of encountering this code surface area, let's capture that with a short description in an issue for working on in the future based on prioritization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad that this diff is causing some friction. This code block should have been part of "making private IP configurable".
Thank you for the input, pulling out the diff.
dbde3cc
to
45d9ad5
Compare
azure/scope/cluster.go
Outdated
}) | ||
} | ||
|
||
// set the internal IP for the internal LB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason we're making this change to assign the FrontendIPConfigs
outside of the &loadbalancers.LBSpec
struct literal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A side affect of "making private Ip configurable" as part of #5315. Sorry for the confusion.
I have pulled out the above code block in the recent commit. Diff should be cleaner now.
45d9ad5
to
9e35b02
Compare
azure/scope/cluster.go
Outdated
@@ -284,7 +284,7 @@ func (s *ClusterScope) LBSpecs() []azure.ResourceSpecGetter { | |||
SubnetName: s.ControlPlaneSubnet().Name, | |||
FrontendIPConfigs: []infrav1.FrontendIP{ | |||
{ | |||
Name: s.APIServerLB().Name + "-internal-frontEnd", // TODO: improve this name. | |||
Name: s.APIServerLB().Name + "-internal-frontEnd", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we didn't improve this name we probably can't remove the // TODO :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥲
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added back the TODO.
9e35b02
to
0ea69a2
Compare
@nawazkh let's take advantage of this PR to update the file triggers for the apiversion upgrade job I think anytime we change |
Please take a look kubernetes/test-infra#33903 |
/lgtm |
LGTM label has been added. Git tree hash: 1442a58f21e72b3344d70c3f32cc3f83ebc5422f
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Part of #5296
Special notes for your reviewer:
TODOs:
Release note: